<?php
//随缘Api
//小姐姐随机视频demo
//用户中心地址:http://www.sybapi.cc
//KEY在个人信息里获取
include("../includes/config.php");//全局文件
if (file_exists('../count/xjjvideo_number.json')) {
    $number = json_decode(file_get_contents('../count/xjjvideo_number.json'), true)['number'];
} else {
    $number = 0;
} 
$now = $number + 1;
$url= 'https://www.sybapi.cc/api/random-video?key='.$key;
header("location:$url") ;
file_put_contents('../count/xjjvideo_number.json', json_encode(['number' => $now]));
?>